/* 弹窗样式 */
.modal {
  display: block;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  margin: 2% auto;
  padding: 0;
  border-radius: 16px;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.close {
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.close:hover {
  color: #ff6b6b;
}

/* 导入前必填标志说明 */
.import-legend {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.4);
  border-radius: 6px;
  padding: 8px 15px;
  margin: 10px 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.legend-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.legend-text {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.3;
}

.legend-text .required {
  color: #ff6b6b;
  font-weight: bold;
}

.batch-notice {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 15px 20px;
  margin: 0 30px 20px 30px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-content {
  flex: 1;
  color: #ffffff;
}

.notice-content strong {
  color: #ffc107;
  font-size: 14px;
  display: block;
  margin-bottom: 5px;
}

.notice-content p {
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.selected-files {
  margin-top: 8px;
}

.selected-files strong {
  color: #ffc107;
  font-size: 12px;
  margin-bottom: 5px;
  display: block;
}

.selected-files ul {
  margin: 0;
  padding-left: 15px;
  list-style-type: disc;
}

.selected-files li {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}

.modal-body {
  padding: 20px 30px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  max-height: calc(90vh - 140px); /* 减去header和footer的高度 */
}

.form-section {
  margin-bottom: 30px;
}

.form-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px dotted #7f8c8d;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 5px;
  font-weight: 500;
}

.required {
  color: #ff4757;
  font-weight: bold;
  margin-left: 2px;
}

.form-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #4a9eff;
  background: rgba(255, 255, 255, 0.15);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-input[readonly] {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

/* 输入错误状态样式 */
.form-input.input-error {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.2);
}

.form-input.input-error:focus {
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.3);
}

/* 错误消息样式 */
.error-message {
  color: #ff6b35;
  font-size: 13px;
  margin-top: 8px;
  padding: 10px 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15) 0%,
    rgba(255, 71, 87, 0.1) 100%
  );
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-left: 4px solid #ff6b35;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
  position: relative;
  animation: slideIn 0.3s ease-out;
  font-weight: 500;
  line-height: 1.4;
}

.error-message::before {
  content: "⚠️";
  margin-right: 8px;
  font-size: 14px;
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 添加一个轻微的脉冲效果来吸引注意力 */
.error-message {
  animation: slideIn 0.4s ease-out, gentlePulse 2s ease-in-out 0.5s;
}

@keyframes gentlePulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
  }
  50% {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  }
}

.form-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: #4a9eff;
  background: rgba(255, 255, 255, 0.15);
}

.form-select option {
  background: #1e3c72;
  color: #ffffff;
}

.form-textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: #4a9eff;
  background: rgba(255, 255, 255, 0.15);
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #4a9eff;
  color: white;
}

.btn-primary:hover {
  background: #66b3ff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .modal-content {
    width: 95%;
    max-width: 1000px;
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    max-width: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px;
  }
}

/* 弹窗内容区域滚动条样式 */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(74, 158, 255, 0.6);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 158, 255, 0.8);
}

.modal-body::-webkit-scrollbar-thumb:active {
  background: rgba(74, 158, 255, 1);
}

/* Firefox 滚动条样式 */
.modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 158, 255, 0.6) rgba(255, 255, 255, 0.1);
}
